<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <!-- 
        把用户填写到账号和密码解析出来显示到div
    -->
    <div>

    </div>
    <script>
        /* 
        1. 获取到用户输入的账号和密码
        ?：左边是服务器地址
        ?：右边是用户输入的参数信息
            参数就是 标签的name属性和value属性组成的
        file:///D:/webs/we/day10_js_code/js_day10_code/13.login_action.html?username=zhangsan&password=123
     */
        console.log(location.search);//显示用户所填写的参数
        const divObj = document.querySelector("div");
        const values = location.search.split("&");
        divObj.innerHTML = "账号" + values[0].split("=")[1] + " 密码" + values[1].split("=")[1];

    </script>
</body>

</html>